package com.test.mapper;

import com.test.entity.Borrow;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/*
 **@Author:youpeng
 **Created on 2022/4/15
 */
@Mapper
public interface BorrowMapper {

    @Select("select * from db_borrow where uid=#{uid}")
    List<Borrow> getBorrowByUid(@Param("uid") int uid);

    @Select("select * from db_borrow where bid=#{bid}")
    List<Borrow> getBorrowByBid(@Param("bid") int bid);

    @Select("select * from db_borrow where uid=#{uid} and bid=#{bid}")
    Borrow getBorrow(@Param("uid") int uid,@Param("bid") int bid);
}
